package aleksandar.djuric.gui;

import java.awt.GridBagLayout;
import javax.swing.JPanel;
import javax.swing.JCheckBox;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JLabel;
import java.awt.ComponentOrientation;

public class UserPassPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JPanel jPanel = null;
	private JCheckBox jCheckBox = null;
	private JTextField jTextField = null;
	private JPasswordField jPasswordField = null;
	private JLabel jLabel = null;
	private JLabel jLabel1 = null;
	private JLabel jLabel2 = null;
	private JLabel jLabel3 = null;

	/**
	 * This is the default constructor
	 */
	public UserPassPanel() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		jLabel3 = new JLabel();
//		jLabel3.setText("<html><font size=\"2\" color=\"red\">Program" +
//				" stores data in unsecure way.</font></html>");
		this.setSize(300, 353);
		this.setLayout(new GridBagLayout());
		this.add(getJPanel(), new GridBagConstraints());
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
			gridBagConstraints12.gridx = 0;
			gridBagConstraints12.gridwidth = 3;
			gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints12.insets = new Insets(0, 20, 0, 0);
			gridBagConstraints12.gridy = 13;
			GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
			gridBagConstraints3.anchor = GridBagConstraints.CENTER;
			gridBagConstraints3.insets = new Insets(0, 10, 0, 10);
			gridBagConstraints3.gridwidth = 2;
			gridBagConstraints3.gridx = 0;
			gridBagConstraints3.gridy = 1;
			gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
			jLabel2 = new JLabel();
			jLabel2.setText("<html>Enter your Football Identity" 
					+ " username and password,<br> so the Program can" 
					+ " get the data from the Internet.</html>");
			GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
			gridBagConstraints2.gridx = 1;
			gridBagConstraints2.gridy = 5;
			jLabel1 = new JLabel();
			jLabel1.setText("<html><font size=\"2\">password</font></html>");
			GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
			gridBagConstraints11.gridx = 0;
			gridBagConstraints11.anchor = GridBagConstraints.CENTER;
			gridBagConstraints11.gridy = 5;
			jLabel = new JLabel();
			jLabel.setText("<html><font size=\"2\">username</font></html>");
			jLabel.setComponentOrientation(ComponentOrientation.UNKNOWN);
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
			gridBagConstraints1.gridx = 1;
			gridBagConstraints1.gridy = 7;
			gridBagConstraints1.weightx = 1.0;
			gridBagConstraints1.fill = GridBagConstraints.BOTH;
			gridBagConstraints1.insets = new Insets(0, 10, 0, 10);
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
			gridBagConstraints.gridx = 0;
			gridBagConstraints.gridy = 7;
			gridBagConstraints.weightx = 1.0;
			gridBagConstraints.insets = new Insets(0, 10, 0, 10);
			gridBagConstraints.fill = GridBagConstraints.BOTH;
			GridBagConstraints checkBoxConstraints = new GridBagConstraints();
			checkBoxConstraints.fill = GridBagConstraints.HORIZONTAL;
			checkBoxConstraints.gridx = 0;
			checkBoxConstraints.gridy = 12;
			checkBoxConstraints.gridwidth = 2;
			checkBoxConstraints.insets = new Insets(0, 10, 0, 0);
			jPanel = new JPanel();
			jPanel.setLayout(new GridBagLayout());
			jPanel.add(getJCheckBox(), checkBoxConstraints);
			jPanel.add(getJTextField(), gridBagConstraints);
			jPanel.add(getJPasswordField(), gridBagConstraints1);
			jPanel.add(jLabel, gridBagConstraints11);
			jPanel.add(jLabel1, gridBagConstraints2);
			jPanel.add(jLabel2, gridBagConstraints3);
			jPanel.add(jLabel3, gridBagConstraints12);
		}
		return jPanel;
	}

	/**
	 * This method initializes jCheckBox	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	public JCheckBox getJCheckBox() {
		if (jCheckBox == null) {
			jCheckBox = new JCheckBox();
			jCheckBox.setText("<html><font size=\"2\">" +
					"Remember username and password.</font></html>");

		}
		return jCheckBox;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	public JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
		}
		return jTextField;
	}

	/**
	 * This method initializes jPasswordField	
	 * 	
	 * @return javax.swing.JPasswordField	
	 */
	public JPasswordField getJPasswordField() {
		if (jPasswordField == null) {
			jPasswordField = new JPasswordField();
		}
		return jPasswordField;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
